Isotopic ratios provide a powerful tool for understanding the origins of materials. Thanks to recent ALMA observations with high sensitivity and high spatial resolution, not only the rings, gaps and spirals in dust continuum emission, but also various molecules, including complex organic molecules as well as many rare isotopologues have been newly detected towards protoplanetary disks. Meanwhile, properties of organic materials and isotope ratios have been studied in comets and meteorites in our solar system. In this talk I will introduce the basic formation processes of molecules and isotope fractionation mechanisms in the interstellar medium, and also recent ALMA observations and chemical reaction network calculations in protoplanetary disks, which suggest the gas-phase elemental abundances in the disks are very different from those in the interstellar medium; carbon and oxygen are significantly depleted, and carbon-to-oxygen elemental abundance ratio is larger than one in many disks. Model calculations suggest that it is possibly caused by frozen-out of gas-phase species on dust grains in turbulent disks. Such condition results in isotope fractionation, which has been observed by ALMA and also suggested by model calculations. Finally, I will briefly discuss a possible link to the materials taken by the Japanese Hayabusa 2 sample return mission exploring to the asteroid Ryugu.